/* src/pages/FoodPage.css */
/* 自定义样式 */

/* 主网格布局 */
.food-page-grid {
    height: 100%;
    margin: 0;
    padding: 0;
  }
  
  /* 桌面端侧边栏样式 */
  .sidebar-col {
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    height: calc(100vh - 56px - 56px); /* 减去头部高度和搜索栏高度 */
    overflow-y: auto;
    padding: 0;
  }
  
  .sidebar-header {
    padding: 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
  }
  
  /* 分类列表样式 */
  .category-list {
    background: transparent;
  }
  
  .category-item {
    --padding-start: 16px;
    --inner-padding-end: 16px;
    --background: transparent;
    --border-color: transparent;
    transition: background-color 0.3s;
    cursor: pointer;
  }
  
  .category-item:hover {
    --background: rgba(0, 0, 0, 0.05);
  }
  
  .category-item.active {
    --background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid var(--ion-color-primary);
  }
  
  /* 内容区域样式 */
  .content-col {
    padding: 20px;
    height: calc(100vh - 56px - 56px); /* 减去头部高度和搜索栏高度 */
    overflow-y: auto;
  }
  
  .content-header {
    margin-bottom: 24px;
  }
  
  .content-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    color: #333;
  }
  
  .content-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
  }
  
  /* 美食卡片网格布局 */
  .food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
  
  .food-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .food-card:hover {
    transform: translateY(-5px);
  }
  
  .food-image-container {
    position: relative;
  }
  
  .food-image {
    height: 180px;
    object-fit: cover;
  }
  
  .favorite-button {
    position: absolute;
    top: 10px;
    right: 10px;
    --padding-start: 0;
    --padding-end: 0;
    --border-radius: 50%;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
  }
  
  .food-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 40px;
  }
  
  .food-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--ion-color-primary);
  }
  
  /* 无结果样式 */
  .no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
  }
  
  .no-results h2 {
    margin-bottom: 10px;
  }
  
  /* 移动端样式 */
  @media (max-width: 768px) {
    .sidebar-col {
      display: none; /* 在移动端隐藏桌面侧边栏 */
    }
    
    .content-col {
      padding: 10px;
      height: calc(100vh - 56px - 56px); /* 减去头部高度和搜索栏高度 */
    }
    
    .content-header {
      margin-bottom: 16px;
    }
    
    .content-header h1 {
      font-size: 1.5rem;
    }
    
    .food-grid {
      grid-template-columns: 1fr;
      gap: 15px;
    }
    
    .food-card {
      margin-bottom: 10px;
    }
    
    /* 移动端分类菜单 */
    .mobile-categories {
      position: fixed;
      top: 112px; /* 头部高度 + 搜索栏高度 */
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 1000;
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
    }
    
    .mobile-categories .category-list {
      width: 70%;
      max-width: 300px;
      height: 100%;
      background-color: white;
      overflow-y: auto;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-categories .category-item {
      --padding-start: 16px;
      --inner-padding-end: 16px;
    }
    
    .mobile-categories .category-item.active {
      border-left: 4px solid var(--ion-color-primary);
      background-color: rgba(255, 107, 107, 0.1);
    }
  }
  
  /* 小屏幕手机优化 */
  @media (max-width: 480px) {
    .food-card {
      margin: 0 0 15px 0;
    }
    
    .food-image {
      height: 150px;
    }
    
    .content-header h1 {
      font-size: 1.3rem;
    }
    
    .content-header p {
      font-size: 0.9rem;
    }
    
    .mobile-categories .category-list {
      width: 80%;
    }
  }
  
  /* 平板设备优化 */
  @media (min-width: 769px) and (max-width: 1024px) {
    .sidebar-col {
      size: "4";
    }
    
    .food-grid {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
  }